home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / Examples / ToolServer Examples / Instructions next >
Encoding:
Text File  |  1998-12-03  |  2.1 KB  |  50 lines  |  [TEXT/MPS ]

  1. Instructions - The ToolServer Example
  2.  
  3. Copyright Apple Computer, Inc. 1993
  4. All rights reserved.
  5.  
  6. The ToolServer Example differs from other examples in that is not so much an
  7. example of ToolServer utilization as it is a package that provides a user-
  8. friendly interface for invoking ToolServer. Although the package can be modi-
  9. fied for use with a remote ToolServer, it is primarily directed at the use of
  10. ToolServer as a background task on the invoking machine.
  11.  
  12. The example consists of three scripts: UserStartup•ToolServer, 
  13. Quit•ToolServer, and UpdateToolServerEnv. A convenient place to put these is
  14. in your MPW folder.  This will ensure that UserStartup•ToolServer is called
  15. during MPW startup and that Quit•ToolServer is called on quitting MPW.
  16.  
  17. UserStartup•ToolServer has as its main function the creation of a "ToolServer"
  18. menu containing the items "Execute Selection", "Set Environment", "Open
  19. Output", and "Quit ToolServer", and the addition to the "Build" menu of the
  20. item "Background Build…". These menu items do the following:
  21.  
  22. •    Execute Selection--This simulates the behavior of pressing "Enter".
  23.      ToolServer executes the same command line that the Shell would have
  24.      executed had "Enter" been pressed.  
  25.  
  26. •    Set Environment--This causes the script UpdateToolServerEnv to be run.
  27.      The relevant portions of the Shell's environment with respect to "Set",
  28.      "Export", and "Alias" commands will be replicated for ToolServer.
  29.      
  30. •    Open Output--The file {MPW}WorkSheet•TS, which has been defined as the
  31.      standard error and output for ToolServer, will be opened as a window.
  32.      
  33. •    Quit ToolServer--This sends a "quit" message to ToolServer.
  34.  
  35. •    Background Build…--This behaves like the "Build…" item in the "Build" 
  36.      menu, except that the build steps are carried out in the background
  37.      by ToolServer.
  38.      
  39. Quit•ToolServer is run when quitting the Shell. It checks to see if any
  40. ToolServer requests are pending.  If so, it sends a message requesting
  41. confirmation of the intent to quit. Before quitting the Shell, it causes
  42. a background ToolServer to quit.
  43.  
  44. For further details, read the very complete comments to be found in the three
  45. scripts.
  46.  
  47.  
  48.  
  49.  
  50.